/*
 * NetworkNetwork.h
 *
 *  Created on: Jun 3, 2010
 *      Author: sdaniele
 */

#ifndef NETWORKNETWORK_H_
#define NETWORKNETWORK_H_

#include "EventNetwork.h"
#include "NetworkProxy.h"

#include "common.h"
#include <string>
#include <vector>
#include <assert.h>

namespace noti {


class NetworkNetwork {
	friend class NetworkProxy;
private:
	size_t num_event_network() const{
		return m_ens.size();
	}
	EventNetwork* at(size_t i){
		return m_ens.operator[](i);
	}

private:
	::std::vector<EventNetwork*> m_ens;
	::std::vector<NetworkProxy*> m_proxies;
	bool m_is_thread;
public:
	NetworkNetwork(bool is_thread);
	virtual ~NetworkNetwork();

	NetworkProxy& event_network(size_t n);
};

}

#endif /* NETWORKNETWORK_H_ */
